<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>修改</title>
    <link th:href="@{/static/bootstrap/css/bootstrap.min.css}" rel="stylesheet">
</head>
<body>
<div class="container main">
    <form action="/users/update" method="post">
        <div class="form-group" style="display: none">
            <label  for="id" class="control-label">ID:</label>
            <input type="text" class="form-control" id="id" name="id" th:value="${user.id}" required="required">
        </div>
        <div class="form-group">
            <label for="username" class="control-label">姓名:</label>
            <input type="text" class="form-control" id="username" name="username" th:value="${user.username}" required="required"
                   oninvalid="setCustomValidity('请输入用户名！');" oninput="setCustomValidity('');">
        </div>
        <div class="form-group">
            <label for="password" class="control-label">密码:</label>
            <input type="password" class="form-control" id="password" name="password" th:value="${user.password}">
        </div>

        <div class="form-group">
            <label for="recipient-phone" class="control-label">电话:</label>
            <input type="text" class="form-control" id="recipient-phone" name="phone" th:value="${user.phone}" required="required"
                   pattern="((13[0-9])|(15[^4])|(18[0-9])|(17[0-8])|(147))\d{8}"
                   oninvalid="setCustomValidity('大陆手机号码11位数，匹配格式：前三位(13|15|18|17|147)后8位任意数！');"
                   oninput="setCustomValidity('');">
        </div>

        <div class="form-group">
            <input class="btn btn-primary" type="submit" value="保存">
        </div>
    </form>

</div>

</body>
</html>